#{extends 'ShowCourses/Obase.html' /}
 <link rel="stylesheet" media="screen" href="@{'/public/stylesheets/back.css'}">		
<ol class="breadcrumb">
  <li><a href="@{Application.index}">首页</a></li>
  <li class="active">在线课堂</li>
  #{if category}
  <li class="active">${category.name }</li>
  #{/if}
</ol>	
		
<div class="col-md-12 course-intro">
	
	  <!-- Nav tabs -->
  <ul class="nav nav-tabs">
    #{list items:listCategory,as:'categoryOne'}
    <li role="presentation" class="${categoryOne.id==category.id?'active':''}"><a href="/showcourses/showonlinecourses?categoryId=${categoryOne.id}" >${categoryOne.name}</a></li>
    #{/list}
  </ul>
   		#{if listCategory.size()==0}
	  <div  class="alert alert-danger alert-dismissible fade in" role="alert">
  		<button type="button" class="close" data-dismiss="alert"><span aria-hidden="true">×</span><span class="sr-only">Close</span></button>
  		<strong>暂时木有数据哦~</strong>
	  </div>
	  #{/if}
    <div class="col-md-12 course-intro" style="padding-bottom:2em">
				<h2>在线课堂：${category?.name }</h2>
				<form class="navbar-search" action="@{ShowCourses.showOnlineCourses}" method="get">
			     <div class="form-group">
				 	<input type="hidden" name="categoryId" value="${category?.id}" />
				 	<input type="text" name="searchKey" id="keyword" class="search-query" value="${searchKey}"  placeholder="请输入关键字" />
				 	<input type="submit" class="btn btn-default" value="搜索" />
				  </div>	
				  #{page pageBean:pageBean,params:params/}
			   </form>
		  		<hr>
				#{list items:list,as:'course'}
					<div class="col-sm-12 col-md-4 course-item">
					  <div class="thumbnail">
					    <img src="${course.photo}" alt="..."  >
					    <div class="caption">
					      <h5>&nbsp;<a>(${course_index+(curPage-1)*pageBean.perPage}):${course.title}</a></h5>
					      <p><span class="glyphicon glyphicon-user"></span><span class="author">&nbsp;${course.getAuthorName()}</span>
					          <br/><span class="glyphicon glyphicon-time"> </span><span class="time">&nbsp;${course.showPubTime()}发布</span> 
					      </p>  
					      <div class="discription">
					       <p class="blog" maxlength="20">简介：${course.info}</p>
					       <p class="text-center"><a target="_blank" href="${course.url}" class="btn btn-default go">查看课程</a></p>
					     </div>
					   </div>
					 </div>
					</div>				
				#{/list}
				<hr>
	</div>
	</div>
